package com.glodon.paas.search.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 命中的查询对象.
 * 
 * @author botao.liao
 * 
 */
public class HitFiles<T> implements Serializable {

    private static final long serialVersionUID = 1L;
    private long totalHits;
    private long tookInMillis;
    private List<T> hits = new ArrayList<T>();

    public long getTotalHits() {
        return totalHits;
    }

    public void setTotalHits(long totalHits) {
        this.totalHits = totalHits;
    }

    public long getTookInMillis() {
        return tookInMillis;
    }

    public void setTookInMillis(long tookInMills) {
        this.tookInMillis = tookInMills;
    }

    public List<T> getHits() {
        return hits;
    }

    public void setHits(List<T> hits) {
        this.hits = hits;
    }

    public void addHit(T file) {
        hits.add(file);
    }

}
